xen/arm: gic: don't use dom0 variable in gicv_setup
authorJulien Grall <julien.grall@linaro.org>
Tue, 19 Nov 2013 17:55:45 +0000 (17:55 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 20 Nov 2013 09:32:19 +0000 (09:32 +0000)
The commit 99bf30a "xen: arm: define guest virtual platform in API headers"
modifies gicv_setup to either use harcoded addresses for guest or hardware
addresses for dom0. In the latter case, the variable dom0 is not yet
initialized. dom0 receives assignment by the return of domain_create which
calls gicv_setup.
Use the ID to know whether the domain is dom0 or not.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/gic.c

index 33c6b8d1ac29436803aae46846a034a601ffcb9b..ab4910699f90d13ada043eca00a94bdda229c114 100644 (file)
@@ -827,7 +827,7 @@ int gicv_setup(struct domain *d)
      * Domain 0 gets the hardware address.
      * Guests get the virtual platform layout.
      */
-    if ( d == dom0 )
+    if ( d->domain_id == 0 )
     {
         d->arch.vgic.dbase = gic.dbase;
         d->arch.vgic.cbase = gic.cbase;